﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using WebChat.Models;

namespace WebChat.Services.Models
{
    public class UserModel
    {
        public int UserId { get; set; }

        public string Username { get; set; }

        public string PictureUrl { get; set; }

        public static Expression<Func<User, UserModel>> FromUser()
        {
            return x => new UserModel
            {
                UserId = x.UserId,
                Username = x.Username,
                PictureUrl = x.PictureUrl
            };
        }
    }
}